import { ref, } from 'vue'
import { defineStore } from 'pinia'


import {getCategoryListApi} from  '@/api/layout'



export const useCounterStore = defineStore('counter', () => {
  // const count = ref(0)
  // const doubleCount = computed(() => count.value * 2)
  // function increment() {
  //   count.value++
  //   console.log(count.value,'3');
  // }
  //导航列表的逻辑
const CategoryList = ref([])
const getCategory = async () => {
  const res = await getCategoryListApi()
  CategoryList.value = res.result
  console.log(res, '2');
}
  // return { count, doubleCount, increment }
  return ({
        getCategory,CategoryList
      })
})
